package string.exercise;

public class StringDemo {

    public static void main(String[] args) {
        String s1 = "hello,";
        String s2 = "hello,world";
        String s3 = s1+"world";
        String s4 = "hello,"+"world";
        final String s5 = "hello,";
        String s6 = s5+"world";
        String s7 = new String("hello,world");


        System.out.println(s2 == s3);
        System.out.println(s2 == s4);
        System.out.println(s2 == s6);
        System.out.println(s6 == s7);
    }
}
